Skip to content

Record and Use Theta levels for the plot function and a few enhancements#16

Merged
cabanesc merged 9 commits intoArgoDMQC:masterfrom
delphinedobler:theta_levels-record-for-the-plot-function
Sep 4, 2025
Merged

Record and Use Theta levels for the plot function and a few enhancements#16
cabanesc merged 9 commits intoArgoDMQC:masterfrom
delphinedobler:theta_levels-record-for-the-plot-function

Conversation

@delphinedobler
Copy link
Collaborator

Records and uses saved theta levels in plots in case of multiple calibration series. Additionally makes a few plots enhancements.

  • modify calculate_piecewisefit.m
    
    • 4.1 Record theta levels
  • modify plt_diagnostics_ow.m
    
    • 4.1 Use of theta levels from those now saved during calculate_piecewisefit function call removing lines with unused parameters (also corrects graph 2 and 4)
    • 4.2 For graph 6 and 8: Change indexes names by a more explicit terminology: usage of iseq, istep, ilevel, iplot instead of i,j,k ... Remove unused parameter lines. These changes were not marked done for the sake of lisibility
    • 4.3 graph format as a configuration parameters
    • 4.4 Enhance Graph 3: curate legend content, split title in two lines, add a grid, position the legend outside the graph.
    • 4.5 Automalically set graph 5 y-axis limits from selected thetas and set the upper bound to 14°C.

DD (2024/08/01) creation
If la_wmo_boxes_file is removed, automatically recreate it from climatology repository (useful when changing climatology version).
auto-creation of output directories if they do not exist already.
Includes:
3.1 - Performance: save boxes_id from get_region_ow and recompute the index to provide as input to retr_region_ow
3.2 - Performance: Inside retr_region_ow, save loaded data, and at each following profile, reload only new boxes and delete unused.
3.3 - Performance: Inside map_data_grid, comment calculation of vdataerror as this is never used afterwards.
correct la_bhist_Z after CC validation tests
@cabanesc
Copy link
Collaborator

Thanks Delphine,
I have tested with float wmo=6902865, splitting the time series at cycle 80.

Here are the figures that have changes between intitial execution (left) and 4.5 run (right)

Figure 1
image

Figure 3
image

Figure 5
image

Figure 6
image

Suggested changes:

  1. For compatibility with the previous version, graph_format = 'eps' should be kept as the default value
    l 37: graph_format = 'eps' ; % 'png' or 'eps'

  2. l 302 & l 322 : change the position of the legend, add a box

legend([p1 p2 p3],{'2 x cal error','1 x cal error','1-1 profile fit'}, 'Location', 'Southoutside','Orientation','horizontal');
box on
  1. l 407 : change ceil(max(TEMP)) by ceil(max(TEMP,[ ],'all'))

fl.yaxes = [floor(min(tlevels,[],'all')) ceil(max(tlevels,[],'all')) ceil(max(TEMP,[],'all'))];

account for Cecile Cabanes comments
@delphinedobler
Copy link
Collaborator Author

Thanks Cécile for your comments. I've updated the Pull Request accordingly. Let me know if everything is fine now.

@cabanesc
Copy link
Collaborator

For Figure 5, if the upper most stable theta level is, say, around 12°C, and the lower most stable theta level is around 4°C (e.g. in NE Atlantic), then I would expect that most of the figure to be squeezed into the lower panel.
So it could be (~l 407 ):
fl.yaxes = [floor(min(min(TEMP,[],'all'),2)) ceil(min(max(tlevels,[],'all'),5)) ceil(min(max(TEMP,[],'all'),20))];

This ensure that the bottom panel is always a zoom on the deepest levels.
What do you think?

The change should also be made for figure 7 (~l.664)

fl.axes modified with respect to CC's comment
@delphinedobler
Copy link
Collaborator Author

I think this is a good idea; I've updated the code as suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants